import 'package:flutter/material.dart';
import 'package:fwanandroid/model/bean/Article.dart';

class ArticleItemWidget extends StatelessWidget {

  Article article;

  ArticleItemWidget({super.key,required this.article});

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Row(
            children: [
              Image.asset(
                "assets/images/home_hot.png",
                width: 12,
                height: 12,
              ),
              Text(
                article.author,
                style: TextStyle(color: Color(0xff8e9dac), fontSize: 12),
              ),
              SizedBox(
                width: 16,
              ),
              Text(
                "${article.superChapterName}/${article.chapterName}",
                style: TextStyle(color: Color(0xff8e9dac), fontSize: 12),
              )
            ],
          ),
          SizedBox(
            height: 8,
          ),
          Text(
            "${article.title}",
            style: TextStyle(fontSize: 16),
          ),
          SizedBox(
            height: 8,
          ),
          Row(
            children: [
              Image.asset(
                "assets/images/ic_time.png",
                width: 12,
                height: 12,
              ),
              Text(
                "${article.niceDate}",
                style: TextStyle(color: Color(0xff8e9dac), fontSize: 12),
              ),
              SizedBox(
                width: 20,
              ),
              Image.asset(
                "assets/images/timeline_like_normal.png",
                width: 12,
                height: 12,
              ),
            ],
          )
        ],
      ),
    );
  }
}
